package com.ny.wlw;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        double money=50;
        System.out.println("你需要支付的金额为："+money);
        System.out.println("请选择你的支付方式：1.银行卡2.支付宝3.微信");
        Scanner scanner=new Scanner(System.in);
        int i=scanner.nextInt();
        switch(i){
            case 1:
                Pay bankPay=new BankPay();
                bankPay.pay(money);
                break;
            case 2:
                Pay spay=new Spay();
                spay.pay(money);
                System.out.println("支付宝支付");
                break;
            case 3:
                Pay Wechatpay=new Wechatpay();
                Wechatpay.pay(money);
                System.out.println("微信支付");
                break;
        }
    }
}
